<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~{$year} http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------

// you should use `$router`
/* @var think\Route $router */

$router->group(function () use ($router) {
    //基本信息维护
    $router->resource('information', '\catchAdmin\archives\controller\Information');
    $router->post('information/save', '\catchAdmin\archives\controller\Information@save');
    $router->post('information/mobile_patient_info', '\catchAdmin\archives\controller\Information@mobile_patient_info');
    $router->post('information/family_mobile', '\catchAdmin\archives\controller\Information@family_mobile');

    //$router->post('information/batchTask', '\catchAdmin\archives\controller\Information@batchTask');
    //病史信息
    $router->resource('history', '\catchAdmin\archives\controller\History');

    //特殊患者标记
    $router->resource('special', '\catchAdmin\archives\controller\Special');
    //患者详情-档案信息
    $router->get('detailed/archival_info', '\catchAdmin\archives\controller\Detailed@archival_info');
    //患者记录
    $router->resource('patient/record', '\catchAdmin\archives\controller\Record');
    $router->post('record/save', '\catchAdmin\archives\controller\Record@save');

    //患者详情住院出院数据
    $router->get('detailed/patient_detail', '\catchAdmin\archives\controller\Detailed@patient_detail');
    //院内医疗
    $router->get('detailed/courtyard_medical', '\catchAdmin\archives\controller\Detailed@courtyard_medical');
    $router->get('detailed/get_relation', '\catchAdmin\archives\controller\Detailed@get_relation');
    $router->get('detailed/get_source', '\catchAdmin\archives\controller\Detailed@get_source');
    //号码维护
    $router->get('detailed/maintenance_list', '\catchAdmin\archives\controller\Detailed@maintenance_list');
    $router->post('detailed/maintenance_save', '\catchAdmin\archives\controller\Detailed@maintenance_save');
    $router->post('detailed/maintenance_up', '\catchAdmin\archives\controller\Detailed@maintenance_up');
    $router->post('detailed/maintenance_del', '\catchAdmin\archives\controller\Detailed@maintenance_del');

    //收案分类
    $router->resource('collect', '\catchAdmin\archives\controller\Collect');
    $router->post('collect/save_classify', '\catchAdmin\archives\controller\Collect@save_classify');
    $router->get('parent_classify', '\catchAdmin\archives\controller\Collect@parent_classify');
    $router->get('list_classify', '\catchAdmin\archives\controller\Collect@list_classify');
    $router->get('collect_patient', '\catchAdmin\archives\controller\Collect@collect_patient');
    $router->post('collect/save', '\catchAdmin\archives\controller\Collect@save');
    $router->post('collect/batch_grouping', '\catchAdmin\archives\controller\Collect@batch_grouping');
    $router->post('collect/mark_death', '\catchAdmin\archives\controller\Collect@mark_death');
    $router->post('collect/cancel', '\catchAdmin\archives\controller\Collect@cancel');
    $router->post('collect/follow', '\catchAdmin\archives\controller\Collect@follow');
    $router->post('collect/up_classify', '\catchAdmin\archives\controller\Collect@up_classify');
    $router->post('collect/del_classify', '\catchAdmin\archives\controller\Collect@del_classify');
    $router->post('collect/monitor', '\catchAdmin\archives\controller\Collect@monitor');
    $router->post('collect/cancelMonitor', '\catchAdmin\archives\controller\Collect@cancelMonitor');


    //Excel导入
    $router->post('/informations/import', 'catchAdmin\archives\controller\Information@import');
    $router->any('/informations/export', 'catchAdmin\archives\controller\Information@export');
    $router->post('/historys/import', 'catchAdmin\archives\controller\History@import');

    //检查患者是否存在随访任务
    $router->post('detailed/maintenance_check', '\catchAdmin\archives\controller\Detailed@maintenance_check');
    $router->resource('MedicalInfo', \catchAdmin\archives\controller\MedicalInfo::class);
    $router->resource('LifeStyle', \catchAdmin\archives\controller\LifeStyle::class);
    $router->resource('TargetData', \catchAdmin\archives\controller\TargetData::class);
    $router->resource('HealthGoal', \catchAdmin\archives\controller\HealthGoal::class);

    //获取出院小结
    $router->any('getDischargeSummary', 'catchAdmin\archives\controller\Detailed@getDischargeSummary');
    $router->any('getOperation', 'catchAdmin\archives\controller\Detailed@getOperation');

    //生成ticket票据
    $router->post('generateTickets', 'catchAdmin\archives\controller\Detailed@generateTickets');
    $router->post("AdvancedSearch", "\catchAdmin\archives\controller\Information@advancedSearch");
})->middleware('auth');

$router->get("GetFormDataByRequestId/<requestId>", "\catchAdmin\archives\controller\T@getFormDataByRequestId");